#include <settings.hpp>
#include <utils.hpp>
//
#include <remoter.hpp>
#include <remoter_cali_prepare.hpp>

RemoterCaliPrepare::RemoterCaliPrepare(int state)
	: RemoterCali(state)
{
}

RemoterCaliPrepare::~RemoterCaliPrepare()
{
}

void RemoterCaliPrepare::Process(msg_rc_raw_s* rcRaw, msg_rc_s* rc)
{
	RemoterCali::Process(rcRaw, rc);

	if (m_Tk % m_CaliWaitTk == 0)
	{
		m_Step++;
		LOG("RemoterCalibration: PREPARE. %d.\n", m_Step);
	}

	if (m_Step >= m_CaliWaitStep)
	{
		Remoter::Instance()->SwitchCaliNext();
	}
}